#!/usr/bin/env node

const fs = require('fs');

const buf = fs.readFileSync('./qr-code.jpg');
let data = buf.toString('base64');
data = `data:image/jpg;base64,${data}`;
//console.log(data);

const http = require('http');

const svr = http.createServer();
svr.on('request',(req,res)=>{
    res.end(`<img src="${data}">`);
});
svr.listen(8080);